<!DOCTYPE html>
<html lang="en">

<head>
 <meta charset="UTF-8">
 <meta name="viewport"
  content="width=device-width, initial-scale=1.0, minimum-scale=1,maximum-scale=1,user-scalable=no">
 <meta http-equiv="X-UA-Compatible" content="ie=edge">
 <title data-ch="恐龙探险" data-en="Dinosaur Adventure" class="document_title">恐龙探险</title>
 <script src="js/jquery-3.3.1.min.js"></script>
 <script src="js/common.js"></script>
 <script src="js/rem.js"></script>
 <script src="js/layer.js"></script>
 <script type="text/javascript">
  isLogin();
 </script>
 <link rel="stylesheet" href="css/common.css">
 <link rel="stylesheet" href="css/index.css">
</head>

<body>
 <!--头部-->
 <div class="jui_top_bar">
  <a class="jui_top_left" href="javascript:history.back(-1)"><img src="icons/back.png"></a>
  <div class="jui_top_middle font_weight col" data-ch="交易细节" data-en="Details">交易细节</div>
 </div>
 <!-- 头部end -->
 <!-- 主体部分开始 -->
 <div class="mai_xijie_box jui_main col_fff padding_032">
  <!-- 第一部分 -->
  <div class="jiaoyi_xijie1">
   
  </div>
  
  <!-- 释放者 -->
  <div class="jiaoyi_xijie2">
   
  </div>
  <!-- 捕猎者 -->
  <div class="jiaoyi_xijie3">
   
  </div>
  <!-- 银行汇款资料 -->
  <div class="jiaoyi_xijie4">
   
  </div>

 </div>
 <!-- 主体部分end -->

 <script>
  $(function(){
   var id = window.location.href.split("?")[1].split("&&")[0].split("=")[1]; // 买卖交易ID
   var type = window.location.href.split("?")[1].split("&&")[1].split("=")[1]; // 1-买家 2-卖家
   var data = {
    uid: localStorage.getItem("u_id"),
    token: localStorage.getItem("token"),
    language_type: localStorage.getItem("language_type"),
    d_id: id,
    d_type: type
   }
   $.ajax({
    type: 'post',
    url: baseURL + '/index.php?m=user&c=deal_info',
    data: data,
    success: function success(data){
     data = JSON.parse(data);
	 is_login(data);
     if(data.code == 1){
      var xijie1 = '';
      var xijie2 = '';
      var xijie3 = '';
      xijie1 = `<div class="mai_xiejie1 padding_032 latout_mask border_radius05">
        <div class="f30 font_weight">
         <span class="col_fff" data-ch="交易ID:" data-en="Reference ID: ">交易ID:</span>
         <span>${data.deal_info.d_num}</span>
        </div>
        <div class="mai_xiejie1_title">
         <span class="col_fff" data-ch="恐龙种类:" data-en="Dino type: ">恐龙种类:</span class="col_fff">
         <span>${data.deal_info.d_name}</span>
        </div>
        <div class="mai_xiejie1_title">
         <span class="col_fff" data-ch="价格:" data-en="Price: ">价格:</span class="col_fff">
         <span>${data.deal_info.d_price}</span>
        </div>
        <div class="mai_xiejie1_title">
         <span class="col_fff" data-ch="匹配时间:" data-en="Matching time: ">匹配时间:</span class="col_fff">
         <span>${data.deal_info.d_p_date}</span>
        </div>
        <div class="mai_xiejie1_title">
         <span class="col_fff" data-ch="已打款:" data-en="Paid: ">已打款:</span class="col_fff">
         <span>${data.deal_info.d_f_date}</span>
        </div>
        <div class="mai_xiejie1_title">
         <span class="col_fff" data-ch="已释放:" data-en="Gained: ">已解放:</span class="col_fff">
         <span>${data.deal_info.d_m_time}</span>
        </div>
       </div>`;
      xijie2 = `<div class="mai_xijie2 padding_032 flex_be latout_mask border_radius05">
        <div>
         <div class="text_left col_fff" data-ch="释放者" data-en="Seller">释放者</div>
         <div class="text_left">
          <span class="col_fff" data-ch="释放者姓名:" data-en="Seller name: ">释放者姓名:</span class="col_fff">
          <span>${data.s_user.m_nickname}</span>
         </div>
         <div class="text_left">
          <span class="col_fff" data-ch="联系号码:" data-en="Contact: ">联系号码:</span class="col_fff">
          <span>${data.s_user.m_phone}</span>
         </div>
        </div>
        <div class="flex_col">
         <a href="" data-num="${data.s_user.m_qq}" class="mai_xijie2_btn whatsApp col_fff mai_xijie2_btn1 border_radius05">WhatsApp</a>
         <a href="" data-num="${data.s_user.m_wx}" class="mai_xijie2_btn telegram col_fff mai_xijie2_btn2 border_radius05">Telegram</a>
        </div>
       </div>`;
      xijie3 = `<div class="mai_xijie2 padding_032 flex_be latout_mask border_radius05">
        <div>
         <div class="text_left col_fff" data-ch="捕猎者" data-en="Buyer">捕猎者</div>
         <div class="text_left">
          <span class="col_fff" data-ch="捕猎者姓名:" data-en="Buyer name: ">捕猎者姓名:</span class="col_fff">
          <span>${data.m_user.m_nickname}</span>
         </div>
         <div class="text_left">
          <span class="col_fff" data-ch="联系号码:" data-en="Contact: ">联系号码:</span class="col_fff">
          <span>${data.m_user.m_phone}</span>
         </div>
        </div>
        <div class="flex_col">
         <a href="" data-num="${data.m_user.m_qq}" class="mai_xijie2_btn whatsApp col_fff mai_xijie2_btn1 border_radius05">WhatsApp</a>
         <a href="" data-num="${data.m_user.m_wx}" class="mai_xijie2_btn telegram col_fff mai_xijie2_btn2 border_radius05">Telegram</a>
        </div>
       </div>`;
	   xijie4 = `<div class="mai_xiejie1 padding_032 latout_mask border_radius05">
	        <div class="f32 mai_xijie3_bank col_fff" data-ch="银行汇款详细资料" data-en="Bank details">银行汇款详细资料</div>
	        <div class="mai_xiejie1_title">
	         <span class="col_fff" data-ch="银行账号:" data-en="Bank account number: ">银行账户:</span class="col_fff">
	         <span>${data.s_user.m_shou_account}</span>
	        </div>
	        <div class="mai_xiejie1_title">
	         <span class="col_fff" data-ch="银行名称:" data-en="Bank name:">银行名称:</span class="col_fff">
	         <span>${data.s_user.m_shou_bank_kai}</span>
	        </div>
	        <div class="mai_xiejie1_title">
	         <span class="col_fff" data-ch="户口姓名: " data-en="Account holder name:">户口姓名:</span class="col_fff">
	         <span>${data.s_user.m_shou_bank_name}</span>
	        </div>
	        <div class="mai_xiejie1_title">
	         <span class="col_fff" data-ch="银行开户处:" data-en="Bank branch：">户口号码:</span class="col_fff">
	         <span>${data.s_user.m_shou_bank}</span>
	        </div>
	       </div>`;

      $(".jiaoyi_xijie1").html(xijie1);
      $(".jiaoyi_xijie2").html(xijie2);
      $(".jiaoyi_xijie3").html(xijie3);
      $(".jiaoyi_xijie4").html(xijie4);
     }
    }
   });
   language();
   documentName();
   let m_wx;
   let m_qq;
   var data1 = {
    uid: localStorage.getItem("u_id"),
    token: localStorage.getItem("token"),
    language_type: language_type
   }
   $.ajax({
    type: 'post',
    url: baseURL + '/index.php?m=index&c=shop_list',
    data: data1,
    success: function success(data) {
     data = JSON.parse(data);
     is_login(data);
     if (data.code == 1) {
      m_qq = data.user.m_qq;
      m_wx = data.user.m_wx;
      
      $(".whatsApp").click(function(){
       let num = $(this).attr("data-num");
       if(m_wx == ""){
        box_timer(language_type == 1 ? "您还没有whatsApp账号哦!" : "You don't have a WhatsApp account yet");
        setTimeout(function(){
         window.location.href=`lianxi.html?wx=${m_qq}&&qq=${m_qq}`
        }, 1000)
       } else {
        $(this).attr("href", `https://api.whatsapp.com/send?phone=${num}`)
       }
      })

      $(".telegram").click(function(){
       let num = $(this).attr("data-num");
       if(m_wx == ""){
        box_timer(language_type == 1 ? "您还没有Telegram账号哦!" : "You don't have a Telegram account yet");
        setTimeout(function(){
         window.location.href=`lianxi.html?wx=${m_qq}&&qq=${m_qq}`
        }, 1000)
       } else {
        $(this).attr("href", `https://web.telegram.org/#/im?p=${num}`)
       }
      })
     }
    }
   })
   
   
  })

  
 </script>
</body>

</html>